
public class RecursiveLength extends ArrayIndexOutOfBoundsException{
	
	public  int Length(String str){
		if(str == null || str.equals("")){
			return 0;
		}
		else
		{
			int count = 0;
			count = 1+Length(str.substring(1));
			System.out.println(str);
			return count;
		}
	}
	
	public static void main(String args[]){
		int length = 0;
		RecursiveLength rl = new RecursiveLength();
		length = rl.Length("Hikaru");
		System.out.print(length);
		
	}
}
